#include <iostream>

using namespace std;

typedef int *IntPtrType;

int main()
{
	int x = 2, y = 8;
	int *p, *q;
	p = &x;// p----> dia chi cua x (0xxX) ma x co o nho la 2
	q = &y;// q ---> dia chi cua y (0xxY) ma y co o nho la 8
	cout<<"address x: "<<&x<<" value x: "<<x<<endl;//&x = 0xxX; x = 2
	cout<<"address p: "<<p<<" value *p: "<<*p<<endl;//p = 0xxX; *p = 2

	cout<<"****************************************\n\n";

	cout<<"address y: "<<&y<<" value y: "<<y<<endl;//&y = 0xxY; y = 8
	cout<<"address q: "<<q<<" value *q: "<<*q<<endl;//q = 0xxY; *q = 8

	cout<<"****************************************\n\n";

	cout<<"address p: "<<&p<<endl;//in ra dia chi cua &p (0xxP)
	cout<<"address q: "<<&q<<endl;//in ra dia chi cua &q (0xxQ)
	system("pause");
}